package com.shixun.exception.exception;

import lombok.Data;

@Data

public class DormException extends RuntimeException{
    private String msg;
    public DormException() {
    }

    public DormException(String message) {
        super(message);
        this.msg=message;
    }
    public static void cast(String message){
        throw new RuntimeException(message);
    }
    public static void cast(CommonError error){
        throw new RuntimeException(error.getErrMessage());
    }
}
